package main

import "fmt"

func main() {
	a := [10]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
	fmt.Println(a)
	s1 := a[9] //取索引为9的元素
	fmt.Println(s1)
	s2 := a[5:10] //包含起始索引,不包含终止索引
	fmt.Println(s2)

	s := make([]int, 3, 6) //创建slice
	s = append(s, 1, 2, 3)
	fmt.Println(s)
	fmt.Printf("%v %p\n", s, s)

}
